import 'dart:io';

// import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:getx_scaffold/common/common.dart';
import 'package:oramemo/core/config/api_config.dart';
import 'package:oramemo/core/network/api_helper.dart';
import 'package:oramemo/core/network/dio_client.dart';
import 'package:oramemo/entity/login_entity.dart';
import 'package:oramemo/pages/facility/blue/blue_view.dart';
import 'package:oramemo/pages/facility/devices/device_list_page.dart';
import 'package:oramemo/pages/login/login/login_area_view.dart';
import 'package:oramemo/pages/record/create/create_list_view.dart';
import 'package:oramemo/pages/test/animation/animation_view.dart';
import 'package:oramemo/pages/user/pay/view.dart';

import '../facility/devices/device_info_page.dart';
import 'blue/main.dart';
import 'test_state.dart';

class TestLogic extends GetxController {
  final TestState state = TestState();
}

testTo() async {
  // Get.to(const PhoneArea());
  // Get.to(PaySampleApp());
  // Get.to(FlutterBlueApp());
  // Get.to(BluePage());
  Get.to(CreateListPage());

  // _pickFile();
  // final musicFile = 'http://oramemo.szcclg.com/prod-api/profile/upload/2024/12/03/recording_1733206874592_20241203142123A010.m4a';
  // Get.to(AudioPlayerPage(audioUrl: musicFile,));

  // final entity = await ApiHelper.request<LoginEntity>(
  //     path: ApiConfig.getInfo, client: DioClient());
  // log(entity.toString());
}

late Directory appDirectory;

// void _pickFile() async {
//   FilePickerResult? result = await FilePicker.platform.pickFiles();
//   if (result != null) {
//   String  musicFile = result.files.single.path!;
//   // Get.to(AudioPlayerPage(musicFile: musicFile,));
//   // final musicFile = 'http://oramemo.szcclg.com/prod-api/profile/upload/2024/12/03/recording_1733206874592_20241203142123A010.m4a'.obs;
//   Get.to(AudioPlayerPage(audioUrl: musicFile,));
//   } else {
//     debugPrint("File not picked");
//   }
// }
